home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / OS / FWGraphx / FWGConst.cpp < prev    next >
Encoding:
Text File  |  1996-09-17  |  5.1 KB  |  148 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWGConst.cpp
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #include "FWOS.hpp"
  11.  
  12. #ifndef FWGCONST_H
  13. #include "FWGConst.h"
  14. #endif
  15.  
  16. #ifndef FWSTRING_H
  17. #include "FWString.h"
  18. #endif
  19.  
  20. #ifndef FWCOLOR_H
  21. #include "FWColor.h"
  22. #endif
  23.  
  24. #ifndef FWINK_H
  25. #include "FWInk.h"
  26. #endif
  27.  
  28. #ifndef FWSTYLE_H
  29. #include "FWStyle.h"
  30. #endif
  31.  
  32. #ifndef FWFONT_H
  33. #include "FWFont.h"
  34. #endif
  35.  
  36. //========================================================================================
  37. //    RunTime Info
  38. //========================================================================================
  39.  
  40. #ifdef FW_BUILD_MAC
  41. #pragma segment FWGraphics_Constants
  42. #endif
  43.  
  44. //========================================================================================
  45. //    Constants
  46. //========================================================================================
  47.  
  48. // ----- Standard Colors -----
  49.  
  50. // I only define colors that are common
  51.  
  52. #ifdef FW_BUILD_WIN 
  53. const FW_SColor    FW_kRGBBlack        =    {    FW_RGB(0x00, 0x00, 0x00)    };
  54. const FW_SColor    FW_kRGBWhite        =    {    FW_RGB(0xFF, 0xFF, 0xFF)    };
  55. const FW_SColor    FW_kRGBRed            =    {    FW_RGB(0xFF, 0x00, 0x00)    };
  56. const FW_SColor    FW_kRGBYellow        =    {    FW_RGB(0xFF, 0xFF, 0x00)    };
  57. const FW_SColor    FW_kRGBBlue            =    {    FW_RGB(0x00, 0x00, 0xC0)    };
  58. const FW_SColor    FW_kRGBGreen        =    {    FW_RGB(0x00, 0xFF, 0x00)    };
  59. const FW_SColor    FW_kRGBBrown        =    {    FW_RGB(0x80, 0x80, 0x00)    };
  60. const FW_SColor    FW_kRGBPurple        =    {    FW_RGB(0xFF, 0x00, 0xFF)    };
  61. const FW_SColor    FW_kRGBLightBlue    =    {    FW_RGB(0x00, 0x00, 0xFF)    };
  62. const FW_SColor    FW_kRGBGray            =    {    FW_RGB(0x80, 0x80, 0x80)    };
  63. const FW_SColor    FW_kRGBLightGray    =    {    FW_RGB(0xC0, 0xC0, 0xC0)    };
  64. const FW_SColor    FW_kRGBDarkGray        =    {    FW_RGB(0x40, 0x40, 0x40)    };
  65. #endif
  66.  
  67. #ifdef FW_BUILD_MAC
  68. const FW_SColor FW_kRGBBlack        =    {    FW_RGB(0x00, 0x00, 0x00)    };
  69. const FW_SColor FW_kRGBWhite        =    {    FW_RGB(0xFF, 0xFF, 0xFF)    };
  70. const FW_SColor FW_kRGBRed            =    {    FW_RGB(0xDD, 0x00, 0x00)    };
  71. const FW_SColor FW_kRGBYellow        =    {    FW_RGB(0xFF, 0xFF, 0x00)    };
  72. const FW_SColor FW_kRGBBlue            =    {    FW_RGB(0x00, 0x00, 0xDD)    };
  73. const FW_SColor FW_kRGBGreen        =    {    FW_RGB(0x00, 0xEE, 0x00)    };
  74. const FW_SColor FW_kRGBBrown        =    {    FW_RGB(0x99, 0x66, 0x00)    };
  75. const FW_SColor FW_kRGBPurple        =    {    FW_RGB(0x66, 0x00, 0x99)    };
  76. const FW_SColor FW_kRGBLightBlue    =    {    FW_RGB(0x00, 0x99, 0xFF)    };
  77. const FW_SColor FW_kRGBGray            =    {    FW_RGB(0x80, 0x80, 0x80)    };
  78. const FW_SColor FW_kRGBLightGray    =    {    FW_RGB(0xC0, 0xC0, 0xC0)    };
  79. const FW_SColor FW_kRGBDarkGray        =    {    FW_RGB(0x40, 0x40, 0x40)    };
  80. #endif
  81.  
  82. // ----- Standard patterns -----
  83.  
  84. // [HLX] should be moved to resource
  85.  
  86. const FW_BitPattern FW_kBlackPat = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};            // black
  87. const FW_BitPattern FW_kWhitePat = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};            // White
  88. const FW_BitPattern FW_kGrayPat = {0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55};                // Gray
  89. const FW_BitPattern FW_kLightGrayPat = {0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22};        // LightGray
  90. const FW_BitPattern FW_kDarkGrayPat = {0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD};            // DarkGray
  91. const FW_BitPattern FW_kHorizontalPat = {0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00};        // Horizontal
  92. const FW_BitPattern FW_kVerticalPat = {0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11};            // Vertical
  93. const FW_BitPattern FW_kFDiagonalPat = {0x88, 0x44, 0x22, 0x11, 0x88, 0x44, 0x22, 0x11};        // FDiagonal
  94. const FW_BitPattern FW_kBDiagonalPat = {0x11, 0x22, 0x44, 0x88, 0x11, 0x22, 0x44, 0x88};        // DDiagonal
  95. const FW_BitPattern FW_kCrossPat = {0x88, 0x88, 0x88, 0xFF, 0x88, 0x88, 0x88, 0xFF};            // Cross
  96. const FW_BitPattern FW_kDiagCrossPat = {0x88, 0x55, 0x22, 0x55, 0x88, 0x55, 0x22, 0x55};        // DiagCross
  97. const FW_BitPattern FW_kAntPat = {0xEE, 0x77, 0xBB, 0xDD, 0xEE, 0x77, 0xBB, 0xDD};                // Ant
  98.  
  99.  
  100. // ------ Standard font names -----
  101. #ifdef FW_BUILD_MAC
  102. static FW_CString32 FW_kPrivSystemFontName("systemFont");
  103. static FW_CString32 FW_kPrivDefaultFontName("applFont");
  104. static FW_CString32 FW_kPrivHelveticaFontName("Helvetica");
  105. static FW_CString32 FW_kPrivTimesFontName("Times");
  106. static FW_CString32 FW_kPrivCourierFontName("Courier");
  107. static FW_CString32 FW_kPrivPalatinoFontName("Palatino");
  108. #endif
  109.  
  110. #ifdef FW_BUILD_WIN
  111. static FW_CString32 FW_kPrivSystemFontName("System");
  112. static FW_CString32 FW_kPrivDefaultFontName("System");
  113. static FW_CString32 FW_kPrivHelveticaFontName("Arial");
  114. static FW_CString32 FW_kPrivTimesFontName("Times New Roman");
  115. static FW_CString32 FW_kPrivCourierFontName("Courier New");
  116. static FW_CString32 FW_kPrivPalatinoFontName("Palatino");
  117. #endif
  118.  
  119. const FW_CString32& FW_GetSystemFontName()
  120. {
  121.     return FW_kPrivSystemFontName;
  122. }
  123.  
  124. const FW_CString32& FW_GetDefaultFontName()
  125. {
  126.     return FW_kPrivDefaultFontName;
  127. }
  128.  
  129. const FW_CString32& FW_GetHelveticaFontName()
  130. {
  131.     return FW_kPrivHelveticaFontName;
  132. }
  133.  
  134. const FW_CString32& FW_GetTimesFontName()
  135. {
  136.     return FW_kPrivTimesFontName;
  137. }
  138.  
  139. const FW_CString32& FW_GetCourierFontName()
  140. {
  141.     return FW_kPrivCourierFontName;
  142. }
  143.  
  144. const FW_CString32& FW_GetPalatinoFontName()
  145. {
  146.     return FW_kPrivPalatinoFontName;
  147. }
  148.